<?php
/**
 * Created by PhpStorm.
 * User: Mak
 * Date: 2016/3/24 0024
 * Time: 16:59
 */

namespace Admin\Model;
use Think\Model;

class DeptInfoModel extends Model{
    protected $tableName = "deptinfo";


    // 得到所有系部表中的记录
    public function getList() {
        $ret = $this->order('did asc')->select();
        return $ret;
    }

    // 根据系部编号取得系部信息
    public function getItem($did){
        $condition['did'] = $did;
        $ret = $this->where($condition)->find();
        return $ret;
    }
}